import java.util.Arrays;

public class xuexi {
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5};
        int[] a=Arrays.copyOfRange(arr,0,2);
        System.out.println(Arrays.toString(a));
    }
}
